package string;

/**
 * String与StringBuilder对比
 */
public class StringStringBuilderDemo {
    public static void main(String[] args) {
        StringBuilder s1 = new StringBuilder("a");
        for (int i = 0; i < 100000; i++) { //十万次
            s1.append(i);//追加内容
        }
        System.out.println("执行完毕");








        /*
        String s = "a";
        for (int i = 0; i < 10000000; i++) {
            s = s+i;
        }
        System.out.println("执行完毕");

         */


















    }
}
